package com.leetcode.LC;

public class LC1374 {
    public String generateTheString(int n) {

        StringBuilder builder = new StringBuilder();
        if (n % 2 == 0) {
            for (int i = 0; i < n - 1; i++) {
                builder.append('a');
            }
            builder.append('b');
        } else {
            for (int i = 0; i < n; i++) {
                builder.append('a');
            }
        }
        return builder.toString();
    }
}
